The present invention relates generally to the use of a hybrid base-ten number system to expand the numerical range of all decimal numbers and more particularly to the year 2000 problem (Y2K). More particularly, the present invention relates to a system, apparatus, and method which uses a hybrid base-ten number system and arithmetic to replace all decimal arithmetic operations and standard base-ten numbers of any length in the machine code of an existing computer program and its databases, such that the existing computer program, when executed, correctly processes two-digit year dates beyond 1999.
Modem-day computers and telecommunication equipment almost universally represent each of the 10 decimal digits (0-9) as a 4-bit binary code. There are many situations in which it is desirable to expand the range of decimal numbers of fixed length, such as, for example, the two-digit year date numbers used in computer programs that suffer the Y2K problem, the seven-digit local telephone numbers, and nine-digit Social Security numbers. With respect to the Y2K problem, as the millennium approaches, information technology departments are faced with a significant problem of ensuring that software programs that process year dates from 1900 to 2000 and beyond function correctly. This problem, commonly referred to as the year 2000 problem, or Y2K, lies in the fact that most four digit year dates are typically represented in by a computer program as two-digits, with the first two-digits of the four-digit year date assumed to be xe2x80x9c19xe2x80x9d. This two-digit year date representation was also typically adopted by programmers when designing user interfaces that displayed year dates, and when storing four-digit year dates in, for example, databases records, and/or data files.
The classical Y2K problem in computer programs stems from the fact that the largest magnitude decimal number that can be represented with two decimal digits is 99. An arithmetic operation on such a year date that involves a carry of 10 to a third digit position will be incorrectly represented by two-digits. To illustrate this, consider that 99+5=104 involves a carry of 10 to a third digit. A computer program, data file, or a database record that retains only the low-order two-digits of the three-digit result as a two-digit year date, will retain an incorrect year date of 04.
Other arithmetic operations, such as, for example subtraction operations may produce erroneous results of the first two-digits of a four-digit year date are assumed to be xe2x80x9c19xe2x80x9d. For example, to determine how old a person born on 12/31/90 (Dec. 31, 1990) would be on 12/31/10 (Dec. 31, 2010), 12/31/90 is typically subtracted from 12/31/10. In particular, year date xe2x80x9c90xe2x80x9d is subtracted from year date xe2x80x9c10xe2x80x9d. It can be seen that such an operation on the two two-digit year date representations does not produce the correct result of 20 years old, but rather an incorrect result of xe2x88x9280 years old.
During the last few years, programmers have faced a monumental task of trying to solve the Y2K problem. Solutions to the Y2K problem typically involve either moving the 100-year span represented by two decimal digits forward to cover some years in the 2000 century, or re-programming existing computer software source code that processes two-digit year dates to use four-digit year dates.
Moving the 100-year span forward is called xe2x80x9cdate windowing.xe2x80x9d Date windowing uses the existing two digit year fields along with additional computer program logic to determine the century, then corrects dates related logic based on a derived century field. This method is limited in that it only works when the dates within an application or a program fall within a 100-year range. Therefore, windowing solution is only a temporary solution and many xe2x80x9cwindowedxe2x80x9d computer programs will have to be reprogrammed in the future to expand the range of years beyond the 100-year range.
The majority of Y2K repair (remediation) work has been done by enormously expensive manual re-programming of computer programs that were written in a programming language such as, for example, COBOL, Fortran, and the like. It can be appreciated that adopting such an approach typically involves redesigning any associated user interfaces, databases, records, and/or data files that use the restricted two-digit year date format.
Often such source code is not even available, and only compiled source code, in the form of machine code is available. Machine code is different from high-level source code or assembly language in that machine code is a numeric version of the computer instructions and data (also known as a binary executable image or run-time program) of a computer program. The programming industry has all but abandoned most run-time computer programs for which there are no source code descriptions available. The common belief is that it is hopeless to unscramble the program logic of these orphan machine code computer programs, because machine code is very difficult for human beings to decipher. There are countless of these orphan machine code computer programs around the world, and many may have to be replaced at an enormous expense.
Number systems that can represent more than 100 year dates with two-digits that will fit into the eight binary bits are known in the art. However, not one of these known numbering schemes has been able to eliminate the need for substantial manual reprogramming of existing computer program source codes to make such computer programs year 2000 compliant. This is because, to use such known numbering schemes, each place in a computer program, and any associated database where a two-digit year date is respectively generated, processed, and/or stored, typically must be manually located so that each two-digit year date can be replaced with a new year 2000 compliant two-digit year date. This is particularly evident when a two-digit year date is embedded in a string of other integers (a larger integer), for example, when a two-digit year date is embedded in a credit card number, or embedded in an inventory part number.
For example, suppose that 67439382 is a part number having an embedded two-digit year date of xe2x80x9c93xe2x80x9d in the respective third and fourth digit positions. Desiring to add, for example, twelve (12) years to the embedded year date to achieve a year date of 2005, a computer program will typically add 1200 to the part number to increase the embedded year date by 12 years, resulting in a sum of 67440582. It can be seen that the addition operation results in a carry of 1*104 to the fourth digit position. Thus, the two-digit year date xe2x80x9c05xe2x80x9d incorrectly appears in the third and fourth digit positions which represents year date 2005 as year date 1905.
An additional problem with the state-of-the-art stems from the fact that many existing computer programs typically reserve one or more special two-digit numerical codes to indicate a particular condition. For example, special code xe2x80x9c99xe2x80x9d year date is sometimes reserved to indicate to a computer program during a read data file operation, that an end-of-file condition has been reached. In yet another example, special code year date xe2x80x9c00xe2x80x9d is typically reserved by a computer program that processes two-digit year dates, to either indicate that no year date information is required in a particular data field, or to indicate that no year date information is available.
As a result, existing computer programs that use such special codes typically do not correctly process any two-digit year dates that are numerically equivalent to the special codes. Therefore, what is needed are a system, apparatus and method for correctly processing a two-digit year date representation that is numerically equivalent to a special code but does not use the same decimal digits used by existing computer programs for the special code.
What is needed is a solution to the Y2K problem that can: (1) modify two-digit decimal year date processing in the machine code of existing computer programs to expand the range beyond 1999 in a manner that does not require manual intervention by a human being to reprogram any source code (if available), or to locate all the places in a computer program and any associated databases where two-digit year dates are respectively generated, processed, or stored; (b) correctly process two-digit year dates that are embedded at any position in a string of other integers; and (c) correctly process two-digit year dates that are numerically equivalent to any special codes. Ideally, this Y2K solution could be applied to all computer programs, not just those computer programs with the available source codes.
In one aspect, a method replaces all decimal arithmetic operations in an existing computer program with a hybrid base-ten number system arithmetic called WF arithmetic which properly processes all decimal numbers and hybrid base-ten WF numbers and returns all computed results as range-expanded WF numbers (which include all decimal numbers). In the simplest version of the six upwardly compatible WF hybrid base-ten number systems (WFNS), the decimal digits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, and one additional digit xe2x80x9caxe2x80x9d are used. The digit xe2x80x9caxe2x80x9d has the value of decimal 10 when used as a multiplier of powers of ten in this WFNS. In this aspect, the range of numerical values expressed by any conventional decimal number can be expanded. Two-digit decimal numbers are expanded to a range of 0 to 110 when expressed in this WFNS.
The various WF number systems are redundant number systems in that most numerical quantities can be expressed by many different WF numbers. This redundancy has many applications in data processing, telecommunications, and data encryption. It provides easy solutions to many problems created by the limits of decimal numbers. Of specific application to the Y2K problem in computers, using this method and version of the WFNS, two-digit decimal numbers that represent year dates are automatically converted to two-digit WF numbers which have an expanded range of 0 to 110 (decimal equivalent) which can represent up to 110 years. The method does not need to know where decimal numbers, in particular two-digit decimal year dates, are stored or processed in an existing computer program. The method easily converts run-time (machine code) programs and does not need source programs. Five of the six xe2x80x9cnestedxe2x80x9d WF number systems that can be used to solve the Y2K problem allow the use of certain non-numerical digit combinations that are recognized by the corresponding WF arithmetic.
In another aspect, the various WF arithmetic rules and functions are embodied in and executed by a system and apparatus that is a run-time computer program called CETA Patch. CETA Patch is connected to and then executed with an existing computer program such that the existing program logic is converted to use WF arithmetic operations in place of all decimal arithmetic operations specified in the existing program logic thereby solving Y2K for up to another 65 years. The original program logic is not changed (reprogrammed) in any other way in the converted run-time program. The system and method that performs the off-line conversion of existing computer programs by connecting CETA Patch to them is called CETA for xe2x80x9cConversion at Execution Time Arithmeticxe2x80x9d.